package com.neuedu.ylbx.controller;

import com.neuedu.ylbx.pojo.SysUser;
import com.neuedu.ylbx.service.SysUserService;
import com.neuedu.ylbx.utils.ResultVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version V1.0
 * @author: xianzhen
 * @date: 2025/7/9
 */

@RestController
@RequestMapping("/sysUser")
@Tag(name = "用户管理")
@CrossOrigin
public class SysUserController {
    @Autowired
    private SysUserService sysUserService;

    @PostMapping("/login")
    @Operation(summary = "用户登录")
    public ResultVo<SysUser> login(SysUser sysUser) throws Exception{
        return sysUserService.login(sysUser);
    }

}
